package summer_vacation.liulee.month7.day20150726;
import java.util.Scanner;
/**
 * Created by Administrator on 2015/7/26.
 */
public class Java12 {
    public static void main(String[] args) {
        int a,b,i;
        System.out.println("请输入一个整数：");
        Scanner input=new Scanner(System.in);
        b= input.nextInt();
        i = (int) b/2;
        for (a=2; a<=i; a++) {
            if (b %a== 0) {
                System.out.println("此数不为素数");
                break;
            }
        }
        if (a>i) {
            System.out.println("此数为素数");
        }
    }
}
